package com.leadingsoft.pwxk.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.leadingsoft.pwxk.converter.ProductConverter;
import com.leadingsoft.pwxk.dto.ProductDto;
import com.leadingsoft.pwxk.model.QProduct;
import com.leadingsoft.pwxk.repository.ProductRepository;
import com.leadingsoft.pwxk.service.ProductService;

/**
 * @author: lipan 2018年5月17日
 * @description: ( 产品及产能信息 )
 * 
 */
@Service
public class ProductServiceImpl implements ProductService {

	@Autowired
	private ProductRepository productRepository;

	@Autowired
	private ProductConverter productConverter;

	QProduct qProduct = QProduct.product;

	

	@Override
	public ProductDto get(String dataid) {
		return productConverter.toDto(productRepository.findByDataid(dataid));
	}

}
